home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / program / swmp141.zip / C_SDK.ZIP / EXAMPLE1.C < prev    next >
C/C++ Source or Header  |  1995-12-12  |  657b  |  25 lines

  1. #include <stdio.h>
  2. #include <process.h>
  3. #include "modplay.inc"
  4.  
  5. unsigned int _stklen  = 0x1000;        /* set stack size to 4kB */
  6. unsigned int _heaplen = 0x0000;        /* no heap required      */
  7.  
  8. unsigned char Mod_File[128];
  9. unsigned char *DOS_Shell="C:\\COMMAND.COM";
  10.  
  11. void main(int argc, char *argv[])
  12. {
  13.  if (argc>1) {
  14.   strcpy(Mod_File, argv[1]);
  15.   Mod_Init(Detection,0,0,0);
  16.   Mod_Load(Mod_File);
  17.   if (Channels!=0) {
  18.    Mod_Play(1);
  19.    DOS_Shell=getenv("COMSPEC");
  20.    if (spawnl(P_WAIT, DOS_Shell, NULL)!=-1) printf("\nReturned... Music output stopped.\n");
  21.   }
  22.  }
  23.  else printf("\nPlease specify a modulefile on the commandline !\n");
  24. }
  25.